/* 表格样式 */
#fundTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#fundTable th, #fundTable td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

#fundTable th {
    background-color: #f8f9fa;
    cursor: pointer;
}

#fundTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#fundTable tr:hover {
    background-color: #f1f1f1;
}

#fundTable .custom-header {
    font-weight: bold;
}

/* 分页样式 */
#pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

#pagination .page-item {
    margin: 0 5px;
}

#pagination .page-link {
    color: #007bff;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    cursor: pointer;
}

#pagination .page-item.disabled .page-link {
    color: #6c757d;
    cursor: not-allowed;
    background-color: #fff;
    border-color: #dee2e6;
}

#pagination .page-item.active .page-link {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

#pagination .page-link:hover:not(.disabled) {
    background-color: #e9ecef;
}

#pagination .page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#pagination select.form-select {
    width: auto;
    display: inline-block;
    margin-right: 10px;
}

/* 添加一些额外的样式 */
body {
    font-family: "Microsoft YaHei", sans-serif;
}

.custom-header {
    background-color: #f8f9fa;
    font-weight: bold;
    text-align: center;
}

.pagination {
    justify-content: center;
}

/* 自定义提示框样式 */
#alertModal .modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#alertModal .modal-header {
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: 1px solid #dee2e6;
}

#alertModal .modal-body {
    padding: 2rem;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-message {
    font-size: 1rem;
    color: #495057;
    flex: 1;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        font-size: 0.9rem;
    }
    
    .form-control, .form-select {
        font-size: 0.9rem;
        padding: 0.375rem 0.5rem;
    }
    
    .pagination {
        font-size: 0.8rem;
    }
    
    .page-link {
        padding: 0.25rem 0.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h5, .h5 {
        font-size: 1.1rem;
    }
    
    h6, .h6 {
        font-size: 0.9rem;
    }
    
    /* 详情页面优化 */
    #detailFundModal .modal-dialog {
        margin: 5px;
    }
    
    #detailFundModal .row {
        margin-bottom: 10px;
    }
    
    #detailFundModal p {
        margin-bottom: 5px;
        font-size: 0.85rem;
    }
    
    /* 图表优化 */
    #netValueChart {
        max-width: 100%;
        height: auto;
    }
    
    /* 表格操作按钮优化 */
    .btn-group-sm > .btn, .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* 平板优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .table th, .table td {
        padding: 0.6rem;
    }
    
    .form-control, .form-select {
        font-size: 0.95rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增大触摸目标 */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 1rem;
    }
    
    .form-control, .form-select {
        min-height: 44px;
    }
    
    .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 增加按钮间距 */
    .btn + .btn {
        margin-left: 5px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .table {
        border: 1px solid #000;
    }
    
    .table th {
        background-color: #000;
        color: #fff;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .modal.fade .modal-dialog {
        transition: none;
    }
}

/* 图表样式 */
#netValueChart {
    width: 100%;
    height: 400px;
}

/* 不可编辑字段样式 */
.form-control:disabled, .form-select:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

.readonly-field {
    background-color: #e9ecef !important;
    opacity: 1;
    cursor: not-allowed;
}